/**
 * 报表设计公司(2011)
 */
package com.reportgear.report.view.cursor.png;

import java.awt.Image;
import java.io.IOException;

import javax.imageio.ImageIO;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * PNG光标处理
 * 
 * @version 1.0 2011-3-14
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 * 
 */
public final class CursorPNG {
	private static final Logger logger = LoggerFactory.getLogger(CursorPNG.class.getName());

	public static final String DEFAULT = "default.png";
	public static final String CELL_DEFAULT = "cell_default.png";
	public static final String CURSOR_V_MOVE = "cursor_vmove.gif";
	public static final String CUROSR_V_SELECT = "cursor_vselect.gif";
	public static final String CURSOR_V_SPLIT = "cursor_vsplit.gif";
	public static final String CURSOR_H_MOVE = "cursor_hmove.gif";
	public static final String CURSOR_H_SELECT = "cursor_hselect.gif";
	public static final String CURSOR_H_SPLIT = "cursor_hsplit.gif";

	private CursorPNG() {
		// 不要创建,只是静态辅助函数
	}

	public static Image readImage(String fileName) {
		try {
			return ImageIO.read(CursorPNG.class.getResource(fileName));
		} catch (IOException ex) {
			logger.warn(ex.getMessage());
		}

		return null;
	}
}
